﻿using System;
using System.CodeDom;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyDesktopPetDemo
{
	class FoodGameService
	{
		public static void LaunchGame(FoodGame.GameCompleteHandler gameCompleteAction)
		{
			FoodGame foodGame = new();
			FormFoodGame form = new(foodGame);
			//foodGame.GameComplete += _ => form.Invoke(() => form.Close());
			foodGame.GameComplete += gameCompleteAction;
			form.Show();
		}
	}
}
